package com.rasou.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DataController {

    private static Logger logger = LoggerFactory.getLogger(DataController.class);

    @GetMapping("/echo")
    public ResponseEntity<String> echo(@RequestParam("msg") String msg) {
        logger.info("echo: " + msg);
        return ResponseEntity.ok("[ECHO] : " + msg);
    }
}
